<template>
  <slot />
</template>

<script setup lang="ts">
import type { NvLocale } from '@/utils/locale'
import type { DictRequest } from '@/utils/use-dict'
import { computed } from 'vue'
import { provideLocale, ZH_CN } from '@/utils/locale'
import { provideDictRequest } from '@/utils/use-dict'

interface Props {
  locale?: NvLocale
  dictRequest?: DictRequest
}
const props = defineProps<Props>()

const locale = computed(() => props.locale || ZH_CN)

provideLocale(locale)

provideDictRequest(props.dictRequest)
</script>
